#include <iostream>


using namespace std;

class A
{
public:
    A(int a) : m_a(a)
    {
        cout << "A" << endl;
    }
    int m_a;
};

class B : virtual public A
{
public:
    B(int b) : m_b(b), A(1)
    {
        cout << "B" << endl;
    }
    int m_b;
};

class C : virtual public A
{
public:
    C(int c) : m_c(c), A(2)
    {
        cout << "C" << endl;
    }
    int m_c;
};

class D : public B, public C
{
public:
    D(int d) : m_d(d), B(1), C(2), A(100)
    {
        cout << "D" << endl;
    }
    int m_d;
};

int main(int argc, char **argv)
{
    D d(3);
    cout << sizeof(d) << endl;

    cout << d.m_a << endl;
    
    return 0;
}